<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="include/header.jsp"%>
<script type="text/javascript" src="${path}/script/customer.js"></script>
<div data-options="region:'center'",style="width:85%;">
        <table id="dg"
            title="客户信息"
            class="easyui-datagrid"
            style="width:100%;height:100%;"
            url="/Lease/customer.json"
            toolbar="#toolbar"
            pagination="true"
            fitColumns="true"
            idField="id"
            singleSelect="true">
                    <thead>
                    <tr>
                        <th field="id" width="5%">ID</th>
                        <th field="name" width="20%">姓名</th>
                        <th field="phone" width="20%">电话号码</th>
                        <th field="address" width="30%">地址</th>
                        <th field="remark" width="25%">备注</th>
                    </tr>
                    </thead>
                </table>
        <div id="toolbar">
            <span>姓名</span>
            <input id="search" style="line-height:23px;border:1px solid #ccc">
            <a href="#" class="easyui-linkbutton" plain="true" onclick="doSearch()">查询</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newUser()">添加</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true"onclick="editUser()">修改</a>
        </div>
        <div id="dlg" class="easyui-dialog" style="width:400px;height:280px;padding:10px 20px"
             closed="true" buttons="#dlg-buttons">
            <div class="ftitle">客户信息</div>
            <form id="fm" method="post" novalidate>
                <div class="fitem">
                    <label>姓名</label>
                    <input name="name" class="easyui-textbox" required="true">
                </div>
                <div class="fitem">
                    <label>电话号码</label>
                    <input name="phone" class="easyui-numberbox" data-options="min:10000000000,precision:0">
                </div>
                <div class="fitem">
                    <label>地址</label>
                    <input name="address" class="easyui-textbox">
                </div>
                <div class="fitem">
                    <label>备注</label>
                    <input name="remark" class="easyui-textbox">
                </div>
            </form>
        </div>
        <div id="dlg-buttons">
            <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-ok" onclick="saveUser()"
               style="width:90px">保存</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel"
               onclick="javascript:$('#dlg').dialog('close')" style="width:90px">退出</a>
        </div>
        <style type="text/css">
            #fm{
            margin:0;
            padding:10px 30px;
            }
            .ftitle{
            font-size:14px;
            font-weight:bold;
            padding:5px 0;
            margin-bottom:10px;
            border-bottom:1px solid #ccc;
            }
            .fitem{
            margin-bottom:5px;
            }
            .fitem label{
            display:inline-block;
            width:80px;
            }
            .fitem input{
            width:160px;
            }
        </style>
    </div>
<%@ include file="include/footer.jsp"%>
